<h1>Listing orders</h1>

<table>
  <tr>
    <th>Id</th>
    <th>Name</th>
    <th>Address</th>
    <th>City</th>
    <th>State</th>
    <th>Zip</th>
    <th>Email</th>
    <th>Shipping cost</th>
    <th>Card type</th>
    <th>Credit card</th>
    <th>Card holder</th>
    <th>Expiration month</th>
    <th>Expiration year</th>
    <th>Created on</th>
    <th>Updated on</th>
  </tr>
  
<% for order in @orders %>
  <tr>
    <td><%=h order.id %></td>
    <td><%=h order.name %></td>
    <td><%=h order.address %></td>
    <td><%=h order.city %></td>
    <td><%=h order.state %></td>
    <td><%=h order.zip %></td>
    <td><%=h order.email %></td>
    <td><%=h order.shipping_cost %></td>
    <td><%=h order.card_type %></td>
    <td><%=h order.credit_card %></td>
    <td><%=h order.card_holder %></td>
    <td><%=h order.expiration_month %></td>
    <td><%=h order.expiration_year %></td>
    <td><%=h order.created_on %></td>
    <td><%=h order.updated_on %></td>
    <td><%= link_to 'Show', order_path(order) %></td>
    <td><%= link_to 'Edit', edit_order_path(order) %></td>
    <td><%= link_to 'Destroy', order_path(order), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New order', new_order_path %>